package com.biz.primus.ms.evaluation.dao.po;

import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;

import javax.persistence.*;

/**
 * 物流评价 {订单编号、快递员编号、快递员评分}
 *
 * @author Tiger Feng
 * @date 2017年11月06日
 */
@Data
@Entity
@Table(name = "ord_evaluation_delivery", indexes = {
        @Index(name = "idx_ord_evaluation_delivery_order_code", columnList = "orderCode"),
        @Index(name = "idex_ord_evaluation_delivery_depot_ode", columnList = "depotCode")
})
public class DeliveryEvaluation extends BaseEntity {
    /**
     * 订单评价
     */
    @OneToOne
    private OrderEvaluation orderEvaluation;
    /**
     * 订单编号
     */
    @Column(length = 64, unique = true)
    private String orderCode;
    /**
     * 门店编号
     */
    @Column(length = 50, nullable = false, unique = true)
    private String depotCode;
    /**
     * 配送员编码
     */
    @Column(length = 32)
    private String shipManCode;
    /**
     * 评分
     */
    @Column(nullable = false)
    private Integer score;
}
